package com.lanlian.uikit;

import android.content.Context;
import android.graphics.drawable.Drawable;

public class ActionItem {

    //定义图片对象
    public Drawable mDrawable;
    //定义文本对象
    public String mTitle;

    public int color;

    public ActionItem(String title) {
        this.mTitle = title;
    }

    public ActionItem(String title, int color) {
        this.mTitle = title;
        this.color = color;
    }

    public ActionItem(Context context, int titleId, int drawableId) {
        this.mTitle = context.getResources().getString(titleId);
        this.mDrawable = context.getResources().getDrawable(drawableId);
    }

    public ActionItem(Context context, String title, int drawableId) {
        this.mTitle = title;
        if (drawableId != 0) {
            this.mDrawable = context.getResources().getDrawable(drawableId);
        }
    }

    public ActionItem(Context context, String title, int drawableId, int color) {
        this.mTitle = title;
        if (drawableId != 0) {
            this.mDrawable = context.getResources().getDrawable(drawableId);
        }
        this.color = color;
    }

    public String getTitle() {
        return mTitle;
    }

}